/* 定义变量与值 */
$bgcolor: lightblue;
$textcolor: red;
$fontsize: random() * 100px;
$myColor: red;
$test:40px;
@import "demo";

/* 使用变量 */
body {
  background-color: $myColor;
  color: $textcolor;
  font-size: $myColor;
  span{
      $myColor: pink !global;
  }
  border-color: $myColor;
}
div{
    width: $test;
    background-color: $bgcolor;
    color: $textcolor;
    font-size: $fontsize;
}

h1 {
  $myColor: green !global;  // 全局作用域
  color: $myColor;
  width: $test2;
}

p {
  color: $myColor;
}

@mixin important-text {
  color: red;
  font-size: 25px;
  font-weight: bold;
  border: 1px solid blue;
}
div{
  @include important-text;
  width: 300px;
  height: 300px;
}